<%--
$Id: article-edit.jsp 13 2010-11-02 15:35:59Z feigme $
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/content/commons/taglibs.jsp" %>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Edit Article</title>
</head>
<body>
<%@ include file="article-menu.jsp" %>
<c:if test="${article!=null}">
<form action="${ctx}/admin/article/<c:out value="${article.id }"/>" method="post">
    <table width="100%">
    	<tr>
    		<td><fmt:message key="article.title"/></td>
    		<td><input name="title" type="text" size="50" value="<c:out value="${article.title }"/>"/></td>
    	</tr>
    	<tr>
    		<td><fmt:message key="article.category.name"/></td>
    		<td>
    			<select id="categorySelect" name="categoryId" style="display: block;">
    				<option style="width:80px;"></option>
    				<c:if test="${categorys!=null}">
	    				<c:forEach var="cat" items="${categorys}">
	    				<option value="${cat.id }" <c:if test="${cat.id==article.category.id }">selected="selected" </c:if>>${cat.name }</option>
	    				</c:forEach>
    				</c:if>
    			</select>
    		</td>
    	</tr>
    	<tr>
    		<td><fmt:message key="article.description"/></td>
    		<td><textarea name="description" rows="3" cols="50"><c:out value="${article.description }"/></textarea></td>
    	</tr>
    	<tr>
    		<td><fmt:message key="article.content"/></td>
    		<td>
    			<FCK:editor toolbarSet="edit_1" instanceName="EditorDefault" value="${article.content }" height="500" inputName="content" basePath="/fckeditor"> 
            	</FCK:editor>  
    		</td>
    	</tr>
        <tr>
            <td colspan="2" align="center">
                <button type="submit"><fmt:message key="common.submit"/></button>
            </td>
        </tr>
    </table>
</form> 
</c:if> 
</body>
</html>